package com.zbkj.common.request.mszs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.zbkj.common.constants.RegularConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 第三方登录-美团商家入驻(账号密码注册登录)-请求类
 * @author lingfe
 */
@Data
@ApiModel("第三方登录-美团商家入驻(账号密码注册登录)-请求类")
public class MszsMeituanLoginRequest implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "手机号", required = true, example = "18888888")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegularConstants.PHONE_TWO, message = "手机号码格式错误")
    @JsonProperty(value = "phone")
    private String phone;

    @ApiModelProperty(value = "美团账号名称", required = true)
    private String account;

    @ApiModelProperty(value = "美团账号密码", required = true, example = "1~[6,18]")
    //@Pattern(regexp = RegularConstants.PASSWORD, message = "密码格式错误，密码必须以字母开头，长度在6~18之间，只能包含字符、数字和下划线")
    private String password;

    @ApiModelProperty(value = "验证码", required = true)
    @Pattern(regexp = RegularConstants.VALIDATE_CODE_NUM_SIX, message = "验证码格式错误，验证码必须为6位数字")
    private String captcha;

    @ApiModelProperty(value = "推广人id")
    private Integer spreadPid;

}
